package com.itheima.jdk8date;

import java.time.LocalDateTime;

/**
 * JDK8 时间类修改时间
 */
public class JDK8DateDemo8 {
    public static void main(String[] args) {
        //public LocalDateTime withYear(int year)   修改年
        LocalDateTime now = LocalDateTime.now();
        LocalDateTime localDateTime = now.withMonth(10);
        System.out.println(localDateTime);
        System.out.println(now.withMonth(13));
    }
}
